package com.dongzili.config;

import org.springframework.context.annotation.Configuration;

@Configuration
public class GatewayConfig {


//    @Bean
//    public RouteLocator customRouteLocator(RouteLocatorBuilder builder, ClientIdRoutingFilterFactory clientIdRoutingFilterFactory) {
//        return builder.routes()
//                .route("route1", r -> r.path("/api/**")
//                        .filters(f -> f.filter(clientIdRoutingFilterFactory.apply(new ClientIdRoutingFilterFactory.Config())))  // 使用工厂创建的过滤器
//                        .uri("lb://default-service"))  // 默认服务
//                .build();
//    }

//    @Bean
//    public SaTokenFilterFactory saTokenFilterFactory(SaTokenFilter saTokenFilter) {
//        return new SaTokenFilterFactory(saTokenFilter);
//    }

}